Socket
Socket
Sign inDemoInstall

react-native-animatable

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-animatable

Easy to use declarative transitions and animations for React Native


Version published
Weekly downloads
447K
increased by4%
Maintainers
1
Weekly downloads
 
Created

What is react-native-animatable?

react-native-animatable is a popular library for React Native that provides a simple way to create animations. It offers a variety of pre-defined animations and allows for custom animations, making it easy to enhance the user interface of your application.

What are react-native-animatable's main functionalities?

Pre-defined Animations

This feature allows you to use a variety of pre-defined animations like 'bounceIn', 'fadeIn', 'zoomIn', etc. The code sample demonstrates how to use the 'bounceIn' animation on a View component.

import React from 'react';
import { View, Text } from 'react-native';
import * as Animatable from 'react-native-animatable';

const Example = () => (
  <Animatable.View animation="bounceIn" duration={1500}>
    <Text>Bounce In Animation</Text>
  </Animatable.View>
);

export default Example;

Custom Animations

This feature allows you to define custom animations by specifying keyframes. The code sample demonstrates how to create a custom animation that changes the opacity and position of a View component.

import React from 'react';
import { View, Text } from 'react-native';
import * as Animatable from 'react-native-animatable';

const customAnimation = {
  0: { opacity: 0, translateY: -100 },
  0.5: { opacity: 1, translateY: 0 },
  1: { opacity: 0, translateY: 100 }
};

const Example = () => (
  <Animatable.View animation={customAnimation} duration={2000}>
    <Text>Custom Animation</Text>
  </Animatable.View>
);

export default Example;

Looping Animations

This feature allows you to create looping animations by setting the 'iterationCount' property. The code sample demonstrates how to create a pulsing animation that loops indefinitely.

import React from 'react';
import { View, Text } from 'react-native';
import * as Animatable from 'react-native-animatable';

const Example = () => (
  <Animatable.View animation="pulse" iterationCount="infinite">
    <Text>Pulsing Animation</Text>
  </Animatable.View>
);

export default Example;

Other packages similar to react-native-animatable

Keywords

FAQs

Package last updated on 26 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc